<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>React 二次体验</title>
    <script src="./js/react.development.js"></script>
    <script src="./js/react-dom.development.js"></script>
  </head>
  <body>
    <div id="root"></div>
    <script>
      //创建 React 元素
      let vdom = React.createElement(
        'div', 
        null, 
        React.createElement( 'h2', null, '西安人的歌'), 
        React.createElement('p', null, '这两天被这首歌洗脑了~~~', 
          React.createElement('a', {href: 'http://www.baidu.com'}, '百度'))
      ); 

      //渲染
      ReactDOM.render(vdom, document.getElementById('root'));

      //rest 参数的回顾
      function createElement(tagName, attributes, ...children){

      }
    </script>
  </body>
</html>
